<template>
  <Portlet class="show" title="订单信息">
    <el-form label-position="left" label-width="120px">
      <el-col :lg="8" :md="12"  :xl="6">
        <el-form-item label="订单号：">
          <span>{{ orderNo }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12"  :xl="6">
        <el-form-item label="业务类型：">
          <span>{{ business }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12"  :xl="6">
        <el-form-item label="服务类型：">
          <span>{{ service }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12"  :xl="6">
        <el-form-item label="下单时间：">
          <span>{{ foundtime | unixTimestampFilter }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12"  :xl="6">
        <el-form-item label="订单状态：">
          <span>{{orderStatus | filterDataBaseDictionary}}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12" :xl="6">
        <el-form-item label="下单方式：">
          <span>{{ orderWay === 1 ? '抛出竞价' : '定向师傅报价'}}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12" :xl="6">
        <el-form-item label="服务方：">
          <span>{{ people }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12" :xl="6">
        <el-form-item label="服务方电话：">
          <span>{{ peopleUserPhone }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :md="12" :xl="6">
        <el-form-item label="服务费：">
          <span>{{ price || 0 }}元</span>
        </el-form-item>
      </el-col>
    </el-form>
  </Portlet>
</template>
<script>
import {dotData} from '@/utils'
import {filterDataBaseDictionary, unixTimestampFilter} from '@/filters'
export default {
  name: 'orderBasic',
  components: {
  },
  filters: {
    filterDataBaseDictionary,
    unixTimestampFilter
  },
  props: {
    orderDetail: {
      type: Object,
      required: true
    }
  },
  computed: {
    orderNo() {
      return dotData(this.orderDetail, 'fhbOrder.orderNo')
    },
    foundtime() {
      return dotData(this.orderDetail, 'fhbOrder.foundtime')
    },
    orderSource() {
      return dotData(this.orderDetail, 'fhbOrder.orderSource')
    },
    orderSourceNo() {
      return dotData(this.orderDetail, 'fhbOrder.orderSourceNo')
    },
    business() {
      return dotData(this.orderDetail, 'fhbOrder.business')
    },
    service() {
      return dotData(this.orderDetail, 'fhbOrder.service')
    },
    orderStatus() {
      return dotData(this.orderDetail, 'fhbOrder.orderStatus')
    },
    orderWay() {
      return dotData(this.orderDetail, 'fhbOrder.orderWay')
    },
    people() {
      return dotData(this.orderDetail, 'fhbOrderBidding.people')
    },
    peopleUserPhone() {
      return dotData(this.orderDetail, 'fhbOrderBidding.peopleUserPhone')
    },
    price() {
      return dotData(this.orderDetail, 'fhbOrderBidding.price')
    }
  }
}
</script>
